<?php

/**
 * Tipo filter form.
 *
 * @package    cronos-doctrine
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class TipoFormFilter extends BaseTipoFormFilter
{
  public function configure()
  {
      unset (
        $this['created_at'],
        $this['updated_at']

      );
      
      //Cambiar a lista y su validador de los status Activo e Inativo 0/1
      $this->widgetSchema['status'] = new sfWidgetFormChoice(array(
         'choices' => Tipo::$status,
         'expanded' => false,
         'multiple' => false,

      ));

      $this->validatorSchema['status'] = new sfValidatorChoice(array(
          'choices' => array_keys(Tipo::$status),

      ));
  }
  
  public function getFields()
  {
    return array(
      'id'         => 'Number',
      'nombre'     => 'Text',
      'status'     => 'ForeignKey',
      'created_at' => 'Date',
      'updated_at' => 'Date',
    );
  }
}
